package com.study.hot.jetpack.lifecycle

import android.util.Log
import androidx.lifecycle.*

/**
 * <pre>
 *     author : slx
 *     time   : 2021/02/24
 *     desc   :
 * </pre>
 */
class LocListener : LifecycleObserver {

    // 可以获取到LifecycleOwner用于判断Owner的状态等
    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    fun start(/*owner: LifecycleOwner, event: Lifecycle.Event*/) {
        Log.i("fauks", "LocListener start...")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    fun stop() {
        Log.i("fauks", "LocListener stop...")
    }
}